﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 行走行为.
/// </summary>
public class WalkAct : IAction
{
    public override void GetAction()
    {

        if (mva.IsGround == false)return;
        //if (animator.GetCurrentAnimatorClipInfo(0)[0].clip.name == "shot") return;
        if (mva.IsHolding)return;


        if (Input.GetKey(KeyCode.D))
        {
            HoriMove(false);
            mva.isWalking = true;
        }
        else if (Input.GetKey(KeyCode.A))
        {
            HoriMove(true);
            mva.isWalking = true;
        }
        else
        {
            mva.isWalking = false;
        }

    }
    public WalkAct(PlayerController comp) : base(comp) { }
   
   

   
}
